package com.example.api.fallback;

import com.example.api.entity.UserEntity;
import com.example.api.feign.MemberServiceFeign;
import com.example.base.BaseApiService;
import com.example.base.ResponseBase;
import org.springframework.stereotype.Component;

/**
 * Create with Intellij idea
 * User:鲁智明
 * Date:2018/11/22
 * Time:21:10
 */
@Component
public class MemberServiceFallback extends BaseApiService implements MemberServiceFeign {

    @Override
    public UserEntity getMember(String name) {
        return null;
    }

    //服务降级友好提示方法
    @Override
    public ResponseBase getUserInfo() {
        return setResultError("当前服务器忙,请稍后重试!");
    }
}
